home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / printq.exe / PRINTAPP.H < prev    next >
C/C++ Source or Header  |  1993-05-23  |  820b  |  52 lines

  1. #if !defined(__PRINTAPP_H)
  2. #define __PRINTAPP_H
  3.  
  4. #if !defined(__PRINTQ_H)
  5. #include "PrintQ.h"
  6. #endif
  7.  
  8. class TPrintAppInit
  9.     {
  10.     public:
  11.  
  12.         TPrintAppInit(PrintQueue* (*fn)()) : createPrintQueue(fn)
  13.             {}
  14.  
  15.     protected:
  16.  
  17.         PrintQueue* (*createPrintQueue)();
  18.     };
  19.  
  20. class TEvent;
  21.  
  22. const ushort cmAddPrintJob = 50000U;
  23.  
  24. class TPrintApp : public TApplication, virtual public TPrintAppInit
  25.     {
  26.     public:
  27.  
  28.         TPrintApp();
  29.  
  30.         virtual void shutDown();
  31.         virtual void idle();
  32.         virtual void handleEvent(TEvent&);
  33.         virtual Boolean valid(ushort);
  34.  
  35.         static PrintQueue* initPrintQueue();
  36.  
  37.         static PrintQueue* printQueue;
  38.     };
  39.  
  40. class TPrintQueue : public PrintQueue
  41.     {
  42.     public:
  43.  
  44.         TPrintQueue() {}
  45.  
  46.     protected:
  47.  
  48.         virtual int printString(const char*, int) const;
  49.     };
  50.  
  51. #endif    // __PRINTAPP_H
  52.